<extend name="Base/base" />

<block name="css"></block>

<!-- 主题内容区域 -->
<block name="content">
<div class="page-header">
	<h1>
		权限管理
		<small>
			<i class="icon-double-angle-right"></i>
			规则表
		</small>
	</h1>
</div><!-- /.page-header -->

<div class="row">
	<div class="col-xs-12">
		<!-- PAGE CONTENT BEGINS -->

		<div class="row">
			<div class="col-xs-12">
				<div class="table-responsive">
					<div class="row">
						<div class="col-sm-6">
							<div class="widget-box">
								<!-- <div class="widget-header widget-header-small"> -->
									<!-- <h5 class="lighter">Search Form</h5> -->
								<!-- </div> -->

								<!-- <div class="widget-body"> -->
									<div class="widget-main">
										<form class="form-search">
											<div class="row">
												<div class="col-xs-12 col-sm-4">
													<div class="input-group">
														<label class="col-sm-3 control-label no-padding-right" for="form-field-5">类型</label>
														<div class="col-sm-9">
															<select class="form-control">
																<option value="">--请选择--</option>
																<option value="AL">Alabama</option>
																<option value="AK">Alaska</option>
																<option value="AZ">Arizona</option>
																<option value="AR">Arkansas</option>
																<option value="CA">California</option>
															</select>
														</div>
													</div>

												</div>
												<div class="col-xs-12 col-sm-8">
													<div class="input-group">
														<input type="text" class="form-control search-query" placeholder="Type your query" />
														<span class="input-group-btn">
															<button type="button" class="btn btn-purple btn-sm">
																Search
																<i class="icon-search icon-on-right bigger-110"></i>
															</button>
														</span>
													</div>
												</div>
											</div>
										</form>
									</div>
								<!-- </div> -->
							</div>
						</div>
						<div class="col-sm-6">
							<div class="dataTables_filter" id="sample-table-2_filter">
								<!-- <label>Search: <input type="text" aria-controls="sample-table-2"></label> -->
							</div>
						</div>
					</div>



					<table id="sample-table-1" class="table table-striped table-bordered table-hover">
						<thead>
							<tr>
								<th class="center">
									<label>
										<input type="checkbox" class="ace" />
										<span class="lbl"></span>
									</label>
								</th>
								<th>排序</th>
								<th>id</th>
								<th>pid</th>
								<th class="hidden-480">菜单名</th>

								<th>
									访问方法
								</th>
								<th class="hidden-480">图标</th>

								<th>操作</th>
							</tr>
						</thead>

						<tbody>

						<foreach name="data" item="v">
							<tr>
								<td class="center">
									<label>
										<input type="checkbox" class="ace" />
										<span class="lbl"></span>
									</label>
								</td>
								<td  class="hidden-280">
									<input type="text" class="ace input-small" name="order_number[{$v['id']}]" value="{$v['order_number']}" />
								</td>
								<td>
									{$v['id']}
								</td>
								<td>{$v['pid']}</td>
								<td class="hidden-480">{$v['_name']}</td>
								<td>{$v['mca']}</td>

								<td class="hidden-480">

									<empty name="v['ico']">
										{$v['ico']|hasIco}
									<else/>

										<i class="icon-{$v['ico']}"></i>
									</empty>
								</td>

								<td>
									<div class="visible-md visible-lg hidden-sm hidden-xs btn-group">
										<button class="btn btn-xs btn-success">
											<i class="icon-ok bigger-120"></i>
										</button>

										<button class="btn btn-xs btn-info">
											<i class="icon-edit bigger-120"></i>
										</button>

										<button class="btn btn-xs btn-danger">
											<i class="icon-trash bigger-120"></i>
										</button>

										<button class="btn btn-xs btn-warning">
											<i class="icon-flag bigger-120"></i>
										</button>
									</div>

									<div class="visible-xs visible-sm hidden-md hidden-lg">
										<div class="inline position-relative">
											<button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown">
												<i class="icon-cog icon-only bigger-110"></i>
											</button>

											<ul class="dropdown-menu dropdown-only-icon dropdown-yellow pull-right dropdown-caret dropdown-close">
												<li>
													<a href="#" class="tooltip-info" data-rel="tooltip" title="View">
														<span class="blue">
															<i class="icon-zoom-in bigger-120"></i>
														</span>
													</a>
												</li>

												<li>
													<a href="#" class="tooltip-success" data-rel="tooltip" title="Edit">
														<span class="green">
															<i class="icon-edit bigger-120"></i>
														</span>
													</a>
												</li>

												<li>
													<a href="#" class="tooltip-error" data-rel="tooltip" title="Delete">
														<span class="red">
															<i class="icon-trash bigger-120"></i>
														</span>
													</a>
												</li>
											</ul>
										</div>
									</div>
								</td>
							</tr>
						</foreach>
							
						</tbody>
					</table>
				</div><!-- /.table-responsive -->
			</div><!-- /span -->
		</div><!-- /row -->
		
		<div class="row">
			<div class="col-sm-6">
				<a href="#" class="btn btn-sm btn-success">
					<i class="icon-refresh bigger-120"></i>
					更新排序
				</a>
			</div>
			<div class="col-sm-6">
				<div class="dataTables_paginate paging_bootstrap"><ul class="pagination"><li class="prev disabled"><a href="#"><i class="icon-double-angle-left"></i></a></li><li class="active"><a href="#">1</a></li><li><a href="#">2</a></li><li><a href="#">3</a></li><li class="next"><a href="#"><i class="icon-double-angle-right"></i></a></li></ul></div>
			</div>
		</div>

		<div class="hr hr-18 dotted hr-double"></div>

		<h4 class="pink">
			<i class="icon-hand-right icon-animated-hand-pointer blue"></i>
			<a href="#modal-table" role="button" class="green" data-toggle="modal"> Table Inside a Modal Box </a>
		</h4>

		<div class="hr hr-18 dotted hr-double"></div>
		
		<!-- 模态框的表格 -->
		<div id="modal-table" class="modal fade" tabindex="-1">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header no-padding">
						<div class="table-header">
							<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
								<span class="white">&times;</span>
							</button>
							Results for "Latest Registered Domains
						</div>
					</div>

					<div class="modal-body no-padding">
						<table class="table table-striped table-bordered table-hover no-margin-bottom no-border-top">
							<thead>
								<tr>
									<th>Domain</th>
									<th>Price</th>
									<th>Clicks</th>

									<th>
										<i class="icon-time bigger-110"></i>
										Update
									</th>
								</tr>
							</thead>

							<tbody>
								<tr>
									<td>
										<a href="#">ace.com</a>
									</td>
									<td>$45</td>
									<td>3,330</td>
									<td>Feb 12</td>
								</tr>

								<tr>
									<td>
										<a href="#">base.com</a>
									</td>
									<td>$35</td>
									<td>2,595</td>
									<td>Feb 18</td>
								</tr>

								<tr>
									<td>
										<a href="#">max.com</a>
									</td>
									<td>$60</td>
									<td>4,400</td>
									<td>Mar 11</td>
								</tr>

								<tr>
									<td>
										<a href="#">best.com</a>
									</td>
									<td>$75</td>
									<td>6,500</td>
									<td>Apr 03</td>
								</tr>

								<tr>
									<td>
										<a href="#">pro.com</a>
									</td>
									<td>$55</td>
									<td>4,250</td>
									<td>Jan 21</td>
								</tr>
							</tbody>
						</table>
					</div>

					<div class="modal-footer no-margin-top">
						<button class="btn btn-sm btn-danger pull-left" data-dismiss="modal">
							<i class="icon-remove"></i>
							Close
						</button>

						<ul class="pagination pull-right no-margin">
							<li class="prev disabled">
								<a href="#">
									<i class="icon-double-angle-left"></i>
								</a>
							</li>

							<li class="active">
								<a href="#">1</a>
							</li>

							<li>
								<a href="#">2</a>
							</li>

							<li>
								<a href="#">3</a>
							</li>

							<li class="next">
								<a href="#">
									<i class="icon-double-angle-right"></i>
								</a>
							</li>
						</ul>
					</div>
				</div><!-- /.modal-content -->
			</div><!-- /.modal-dialog -->
		</div><!-- PAGE CONTENT ENDS -->
	</div><!-- /.col -->
</div><!-- /.row -->

</block>


<block name="js">
	<script>
		var SCOPE = {
			"del_url" : "{:U('Rule/delById')}",
			"edit_url" : "{:U('Rule/edit')}",
		};

		function changeStatus(id)
		{
			layer.open({
				content:"Are you sure?",
				icon:3,
				btn:['是','否'],
				yes:function(){
					console.log(id);
				},
			});
		}
	</script>
</block>